home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue71 / CSharp / CS / Delphi / TDMWebLib_TLB.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2001-05-18  |  5.0 KB  |  112 lines

  1. unit TDMWebLib_TLB;
  2.  
  3. // ************************************************************************ //
  4. // WARNING                                                                    
  5. // -------                                                                    
  6. // The types declared in this file were generated from data read from a       
  7. // Type Library. If this type library is explicitly or indirectly (via        
  8. // another type library referring to this type library) re-imported, or the   
  9. // 'Refresh' command of the Type Library Editor activated while editing the   
  10. // Type Library, the contents of this file will be regenerated and all        
  11. // manual modifications will be lost.                                         
  12. // ************************************************************************ //
  13.  
  14. // PASTLWTR : $Revision:   1.88.1.0.1.0  $
  15. // File generated on 18/05/2001 15:20:59 from Type Library described below.
  16.  
  17. // ************************************************************************ //
  18. // Type Lib: C:\Projects\2000\ITEC\cs-delphi\TDMWebLib.tlb (1)
  19. // IID\LCID: {3DA81917-9E9B-4155-A019-6CB4CC5A9731}\0
  20. // Helpfile: 
  21. // DepndLst: 
  22. //   (1) v2.0 stdole, (C:\WINNT\System32\Stdole2.tlb)
  23. //   (2) v4.0 StdVCL, (C:\WINNT\System32\STDVCL40.DLL)
  24. // ************************************************************************ //
  25. {$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers. 
  26. interface
  27.  
  28. uses Windows, ActiveX, Classes, Graphics, OleServer, OleCtrls, StdVCL;
  29.  
  30. // *********************************************************************//
  31. // GUIDS declared in the TypeLibrary. Following prefixes are used:        
  32. //   Type Libraries     : LIBID_xxxx                                      
  33. //   CoClasses          : CLASS_xxxx                                      
  34. //   DISPInterfaces     : DIID_xxxx                                       
  35. //   Non-DISP interfaces: IID_xxxx                                        
  36. // *********************************************************************//
  37. const
  38.   // TypeLibrary Major and minor versions
  39.   TDMWebLibMajorVersion = 1;
  40.   TDMWebLibMinorVersion = 0;
  41.  
  42.   LIBID_TDMWebLib: TGUID = '{3DA81917-9E9B-4155-A019-6CB4CC5A9731}';
  43.  
  44.   IID_IPackage: TGUID = '{053B0AA8-3D4D-450F-9F2F-FDEC2A07F2CA}';
  45.   CLASS_Package: TGUID = '{47097128-B650-4762-8F55-8790B80F6610}';
  46. type
  47.  
  48. // *********************************************************************//
  49. // Forward declaration of types defined in TypeLibrary                    
  50. // *********************************************************************//
  51.   IPackage = interface;
  52.   IPackageDisp = dispinterface;
  53.  
  54. // *********************************************************************//
  55. // Declaration of CoClasses defined in Type Library                       
  56. // (NOTE: Here we map each CoClass to its Default Interface)              
  57. // *********************************************************************//
  58.   Package = IPackage;
  59.  
  60.  
  61. // *********************************************************************//
  62. // Interface: IPackage
  63. // Flags:     (4416) Dual OleAutomation Dispatchable
  64. // GUID:      {053B0AA8-3D4D-450F-9F2F-FDEC2A07F2CA}
  65. // *********************************************************************//
  66.   IPackage = interface(IDispatch)
  67.     ['{053B0AA8-3D4D-450F-9F2F-FDEC2A07F2CA}']
  68.     function  Basic(iOption: Integer): Double; safecall;
  69.     function  Advanced(iOption: Integer): Double; safecall;
  70.     function  Professional(iOption: Integer): Double; safecall;
  71.   end;
  72.  
  73. // *********************************************************************//
  74. // DispIntf:  IPackageDisp
  75. // Flags:     (4416) Dual OleAutomation Dispatchable
  76. // GUID:      {053B0AA8-3D4D-450F-9F2F-FDEC2A07F2CA}
  77. // *********************************************************************//
  78.   IPackageDisp = dispinterface
  79.     ['{053B0AA8-3D4D-450F-9F2F-FDEC2A07F2CA}']
  80.     function  Basic(iOption: Integer): Double; dispid 1;
  81.     function  Advanced(iOption: Integer): Double; dispid 2;
  82.     function  Professional(iOption: Integer): Double; dispid 3;
  83.   end;
  84.  
  85. // *********************************************************************//
  86. // The Class CoPackage provides a Create and CreateRemote method to          
  87. // create instances of the default interface IPackage exposed by              
  88. // the CoClass Package. The functions are intended to be used by             
  89. // clients wishing to automate the CoClass objects exposed by the         
  90. // server of this typelibrary.                                            
  91. // *********************************************************************//
  92.   CoPackage = class
  93.     class function Create: IPackage;
  94.     class function CreateRemote(const MachineName: string): IPackage;
  95.   end;
  96.  
  97. implementation
  98.  
  99. uses ComObj;
  100.  
  101. class function CoPackage.Create: IPackage;
  102. begin
  103.   Result := CreateComObject(CLASS_Package) as IPackage;
  104. end;
  105.  
  106. class function CoPackage.CreateRemote(const MachineName: string): IPackage;
  107. begin
  108.   Result := CreateRemoteComObject(MachineName, CLASS_Package) as IPackage;
  109. end;
  110.  
  111. end.
  112.